#ifndef LOGUTILS_H
#define LOGUTILS_H

#include <QObject>
#include <QDebug>
#include <QDateTime>

void messageOutput(QtMsgType type, const QMessageLogContext &context, const QString& msg);

class LogUtils : public QObject
{
    Q_OBJECT
public:
    static LogUtils *GetInstance(QObject *parent = nullptr);

    void setLogFile(const QString &filename);
    void saveFile(const QString &msg);

private:
    explicit LogUtils(QObject *parent = nullptr);
    static LogUtils *m_pInstance;
    QString m_file;
};

#endif // LOGUTILS_H
